home *** CD-ROM | disk | FTP | other *** search
- ' This simple macro displays the X, Y, and Z size of the
- ' selected object.
- '
- ' This macro works fine in 3D mode, since all lines in 3D
- ' Mode are of zero width. If you use this macro in 2D Mode,
- ' you can get results which you may not expect, since SYS
- ' functions 196-201 use the boundary of the items, NOT their
- ' point locations, and points for wide lines are set in their
- ' middles, not on either side of the wide line, until exploded.
- '
- ' Make sure something is selected before going on
- if Sys(80) = 0 then
- Message "Please select an object before using this macro."
- goto Ender
- endif
- ' Get Values about selected item
- MinX = Sys(196)
- MinY = Sys(197)
- MaxX = Sys(198)
- MaxY = Sys(199)
- MinZ = Sys(200)
- MaxZ = Sys(201)
- ' Calculate Sizes
- SizeX = MaxX - MinX
- SizeY = MaxY - MinY
- SizeZ = MaxZ - MinZ
- ' Display Results
- Message "Object Size is . . . X: ",SizeX, " Y: ", SizeY, " Z: ", SizeZ
- Ender:
- End
-